#个人中心
from selenium.webdriver.common.by import By

from utils.page_base import PageBase #导入基类

class PageUser(PageBase):
    url="/ucenter/index"
    loc_nicen=By.CSS_SELECTOR,"div.user_info >h2"

    def __init__(self,driver,base_url):
        #从业务层接收driver、base_url
        PageBase.__init__(self, driver, base_url)

    def openUrl(self):
        self.open(PageUser.url)


    #获取h2昵称标签的文本内容："nswe，欢迎光临"
    def getH2EleText(self):
        return self.getEleText(PageUser.loc_nicen)